﻿//////////////////////////////////////////////////////////////////////////////
//
//  Copyright © 1998-2024 Glodon Company Limited.  All rights reserved.
//
//  Use of this software is subject to the terms of the Glodon license
//  agreement provided at the time of installation or download, or which
//  otherwise accompanies this software in either electronic or hard copy form.  
//
//////////////////////////////////////////////////////////////////////////////

#pragma once

namespace gcmp {


    /// \brief  多截面放样顶点匹配模式
    enum class MultiSectionLoftVertexMatchMode : int32_t
    {
        Default = -1, ///< 默认匹配模式(需指定匹配点)
        Ratio = 0,   ///< 比率模式
        Vertex = 1   ///< 顶点模式
    };

    /// \brief  多截面放样错误码
    enum class MultiSectionLoftErrorCode : int32_t
    {
        // return data
        Unknown = -1,                            ///< 未知错误
        Success = 0,                             ///< 默认成功

        // workplace
        WorkPlaneNotMapWithSection = 10,
        WorkPlaneNull = 11,                          ///< Work plane 为null

        // section
        SectionCurveNull = 20,                       ///< Section Curve 为null
        SectionNotBiggerTwo = 21,
        SectionVertexNotEqual = 22,
        SectionNumError = 23,                        ///< 截面线数目错误-小于2或者和工作平面数目不匹配
        SectionNotValid = 24,                        ///< 截面线无效

        // polygon
        PolygonNull = 30,                             ///< polygon为null
        PolygonNotStrictlyvalid = 31,                 ///< polygon不是严格合法

        // CoedgeList     
        CoedgeListNull = 40,                        ///< Coedgelist为null
        CoedgeListNotStrictlyvalid = 41,            ///< Coedgelist不是严格合法
        CoedgeListEmpty = 42,                       ///< Coedgelist的CoedgeCount为0

        // guide curve
        GuideCurveNull = 50,                        ///< 引导线为null
        GuideCurveNotCrossedWithSection = 51,       ///< 引导线不与截面线相交
        GuideCurveDestroyFaceEdge = 52,             ///< 引导线破坏面边线
        GuideCurveSelfIntersection = 53,            ///< 引导线自交
        GuideCurveNotValid = 54,                    ///< 引导线无效

        // Close point
        ClosedPointError = 60,

        // ratio mode
        RatioModeFailed = 70,                         ///< 比例模式失败

        // map
        MapError = 80,  ///< 对应关系错误

        // min segment length
        MinSegmentNotBiggerThanZero = 90,            ///< 极小段长度要大于0.0
        OutputSectionCurveLessThanMinSegment = 91,   ///< 输出截面线小于极小段
        InputSectionCurveLessThanMinSegment = 92     ///< 输入截面线小于极小段  
    };

}// namespace gcmp
